from BasicLibraries import *

'''
These are just auxiliary functions to adjust the name of the variable for plotting
'''
def global_vars():
    marker_type = ['o', 's', 'h', '>', '*', '8']
    line_style = ['-', '-.', '--']
    index_dict = {'firm_size': 'Size',
                  'investment': 'Invested Capital',
                  'MTB': 'Market to Book',
                  'MarketLeverage': 'Leverage',
                  'system_thinking': 'System Thinking',
                  'Is_target': 'Internal target',
                  'emission_intensity': 'Emission intensity',
                  'esg_exec_comp': 'ESG executive compensation',
                  'supplier_training': 'Supplier training',
                  'environmental_supchain_policy': 'Supply chain policy',
                  'environmental_partnerships': 'Environmental Partnership',
                  'env_material_sourcing': 'Material sourcing', 
                  'env_products': 'Environmental products',
                  'EDI_target': 'EDI targets',
                  'policy_board': 'Board EDI policy',
                  'stakeholder_eng': 'Stakeholder engagement',
                  'text_length': 'Length of text',
                  'poly': 'Polysyllables', 
                  'dale': 'Dale-Chall index',
                  'pos': 'Positive sentiment'}

    inverse_dict = {v: k for k, v in index_dict.items()}
    
        
    abb_index_dict = {'firm_size': 'Size',
                  'investment': 'Investment',
                  'MTB': 'Mkt-to_book',
                  'MarketLeverage': 'Leverage',
                  'system_thinking': 'System Thinking',
                  'Is_target': 'Internal target',
                  'emission_intensity': 'Emission intensity',
                  'esg_exec_comp': 'ESG ex. comp.',
                  'supplier_training': 'Supp. training',
                  'environmental_supchain_policy': 'Supp. chain policy',
                  'environmental_partnerships': 'Env.Partnership',
                  'env_material_sourcing': 'Material sourcing', 
                  'env_products': 'Env. products',
                  'EDI_target': 'EDI targets',
                  'policy_board': 'Board EDI policy',
                  'stakeholder_eng': 'Stakeholder eng.',
                  'text_length': 'Length of text',
                  'poly': 'Polysyllables', 
                  'dale': 'Dale-Chall index',
                  'pos': 'Positive sentiment'}
    
    
    STcontrols = ['text_length', 'poly', 'dale', 'pos']
    return  marker_type, line_style, index_dict, abb_index_dict, inverse_dict, STcontrols